// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()
const db = cloud.database();
// 云函数入口函数
exports.main = async (event, context) => {
  return await db.collection("ReceiveAndSend").add({
    data:{
     name:event.params.name,
     gender:event.params.gender,
     phone:event.params.phone,
     company:event.params.company,
     sushehao:event.params.sushehao,
     sushelou:event.params.sushelou,
     time:event.params.time,
     qujianma:event.params.qujianma,
     date:event.params.date,
     state:'未完成',
     type:'代寄快递',
     openid:event.openid,
    }
  })
  //return{event}
}